package com.twu.biblioteca.view.consoleUI.viewActions;

import com.twu.biblioteca.view.ViewAction;
import com.twu.biblioteca.view.consoleUI.ConsoleUI;

public class LoginViewAction implements ViewAction {

    private final ConsoleUI consoleUI;

    public LoginViewAction(ConsoleUI consoleUI) {
        this.consoleUI = consoleUI;
    }

    @Override
    public void update(boolean success) {
        if (success) {
            consoleUI.getOutput().println("Welcome Back. Options Available:");
            consoleUI.showOptions();
        } else {
            consoleUI.getOutput().println("Invalid Login.");
        }
    }
}
